package chuishop.yiqimaicai.service.Impl;

import chuishop.yiqimaicai.mapper.ComplaintMapper;
import chuishop.yiqimaicai.pojo.Complaint;
import chuishop.yiqimaicai.pojo.Orderpick;
import chuishop.yiqimaicai.service.ComplaintService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ComplaintServiceImpl implements ComplaintService {


    @Autowired
    private ComplaintMapper complaintMapper;

    @Override
    public List<Complaint> findAllComplaint() {
        return complaintMapper.findAllComplaint();
    }

    @Override
    public List<Complaint> findComplaintById(Integer cid) {
        return complaintMapper.findComplaintById(cid);
    }

    @Override
    public boolean delComplaint(String[] ids) {
        if(complaintMapper.delComplaint(ids)>0){
            return true;
        }
        return false;
    }

    @Override
    public boolean addComplaint(Complaint complaint) {
        if(complaintMapper.addComplaint(complaint)>0){
            return true;
        }
        return false;
    }

    @Override
    public boolean updateComplaint(Complaint complaint) {
        if(complaintMapper.updateComplaint(complaint)>0){
            return true;
        }
        return false;
    }
}
